package com.faithbj.simu;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ConfirmServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;
	
	
	
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		RequestDispatcher rd = req.getRequestDispatcher("/index.jsp");
		String name = req.getParameter("poaCode");
		if(name.equals("11111111111111111111111"))//有值
		{
			req.setAttribute("serial","生成保单/批单2 笔，号码为：<br />1075105072014013803<br />1075105092014011515");
		}
		else if(name.equals("00000000000000000000000"))//没有值
		{
			req.setAttribute("msg","该笔交易为非到帐状态，不能进行投保/批改确认！");
		}
        rd.forward(req,resp);
	}


	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		 
		 doGet(req, resp);
	}  
	
	
	
	
	
}
